#include <iostream>
using namespace std;

int main() {
	int n, a[100001], len = 1, max = -9999;
	cin >> n;
	a[0] = -987654321;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
		if (a[i] == a[i - 1])
			len++;
		else
			len = 1;
		if (len > max)
			max = len;
	}
	cout << max;
	return 0;
}